package com.brzjomo.secretiveworld.init;

import com.brzjomo.secretiveworld.SecretiveWorld;
import com.google.common.base.Supplier;

import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;

public class ModItemGroups {
	
	//创建创造模式物品栏分页
	public static final ItemGroup MOD_ITEM_GROUP_BUILDING_BLOCK = new ModItemGroup(SecretiveWorld.MODID + ".building_block", () -> new ItemStack(ModBlocks.COPPER_ORE.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_INSTRUMENT = new ModItemGroup(SecretiveWorld.MODID + ".instrument", () -> new ItemStack(ModBlocks.DRY_NET.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_MATERIAL = new ModItemGroup(SecretiveWorld.MODID + ".material", () -> new ItemStack(ModItems.COPPER_INGOT.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_TOOL = new ModItemGroup(SecretiveWorld.MODID + ".tool", () -> new ItemStack(ModItems.COPPER_PICKAXE.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_BOOK_AND_LETTER = new ModItemGroup(SecretiveWorld.MODID + ".book_and_letter", () -> new ItemStack(Items.WRITABLE_BOOK));
	
	public static final ItemGroup MOD_ITEM_GROUP_PLANT = new ModItemGroup(SecretiveWorld.MODID + ".plant", () -> new ItemStack(Items.ROSE_BUSH));
	
	public static final ItemGroup MOD_ITEM_GROUP_FOOD = new ModItemGroup(SecretiveWorld.MODID + ".food", () -> new ItemStack(ModItems.RYE_BREAD.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_POTION = new ModItemGroup(SecretiveWorld.MODID + ".potion", () -> new ItemStack(ModItems.POTION_AUGUR.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_SEAL_ITEM = new ModItemGroup(SecretiveWorld.MODID + ".seal_item", () -> new ItemStack(ModItems.SEAL_ITEM_3_0782.get()));
	
	public static final ItemGroup MOD_ITEM_GROUP_EGG = new ModItemGroup(SecretiveWorld.MODID + ".egg", () -> new ItemStack(Items.CHICKEN_SPAWN_EGG));
	
	public static final ItemGroup MOD_ITEM_GROUP_OTHER = new ModItemGroup(SecretiveWorld.MODID + ".other", () -> new ItemStack(Items.MUSIC_DISC_CAT));
	
	//设置分页名称和图标
	public static class ModItemGroup extends ItemGroup {

		private final Supplier<ItemStack> iconSupplier;

		public ModItemGroup(final String name, final Supplier<ItemStack> iconSupplier) {
			super(name);
			this.iconSupplier = iconSupplier;
		}

		@Override
		public ItemStack createIcon() {
			return iconSupplier.get();
		}

	}
}
